package com.sc.util.ChanPay.util;

public enum BankCodeNameEnum {
	ZGYH("BOC","中国银行"),
	ZGNYYH("ABC","中国农业银行"),
	ZGGSYH("ICBC","中国工商银行"),
	ZGJSYH("CCB","中国建设银行"),
	ZGYZYH("PSBC","中国邮政储蓄银行"),
	ZSYH("CMB","招商银行"),
	ZGMSYH("CMBC","中国民生银行"),
	ZGGDYH("CEB","中国光大银行"),
	PFYH("SPDB","浦发银行"),
	ZXYH("CITIC","中信银行"),
	PAYH("SZPAB","平安银行"),
	XYYH("CIB","兴业银行"),
	BJYH("BCCB","北京银行"),
	GFYH("GDB","广发银行"),
	HXYH("HXB","华夏银行"),
	SHYH("BOS","上海银行"),	
	JTYH("COMM","交通银行"),
	DYYH("HKBEA","东亚银行"),
	NBYH("NBCB","宁波银行"),
	NJYH("NJCB","南京银行"),
	FXYH("HXB","华夏银行"),
	SHNCSYYH("SHRCB","上海农村商业银行"),
	WXSM("WXPAY","微信扫码"),
	ZFB("ALIPAY","支付宝扫码");
	/** 机构代码 */
	public String instCode;
	/** 机构名称*/
	public String instName;
	
	BankCodeNameEnum(String instCode, String instName){
		this.instCode = instCode;
		this.instName = instName;
	}

	public String getInstCode() {
		return instCode;
	}

	public void setInstCode(String instCode) {
		this.instCode = instCode;
	}

	public String getInstName() {
		return instName;
	}

	public void setInstName(String instName) {
		this.instName = instName;
	}
	
    public static String getInstNameByCode(String instName){
    	for(BankCodeNameEnum bank:BankCodeNameEnum.values()){
    		if(bank.getInstName().equals(instName)){
    			return bank.getInstCode();
    		}
    	}
		return "";
    }
    public static void main(String[] args) {
    	System.out.println(getInstNameByCode("宁波银行"));
	}

}
